﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Security.Permissions;
using System.Runtime.Serialization;

namespace PIS.TechGrid.Gadgets.ChangeIP
{
    [Serializable]
    public class IPConfigList
    {
        MyList<IPConfig> configList;

        public IPConfigList()
        {
        }

        public IPConfigList(MyList<IPConfig> configs)
        {
            this.ConfigList.AddRange(configs);
        }

        public string Name { get; set; }

        public MyList<IPConfig> ConfigList
        {
            get
            {
                if (configList == null)
                {
                    configList = new MyList<IPConfig>();
                }

                return configList;
            }
        }

        public void Add(params IPConfig[] configs)
        {
            this.ConfigList.AddRange(configs);
        }

        public void Remove(IPConfig config)
        {
            this.ConfigList.Remove(config);
        }
    }
}
